/**
 * File: GraphUtil.java
 * Created by: mhaimel
 * Created on: Mar 8, 2010
 * CVS:  $Id: GraphUtil.java 1.0 Mar 8, 2010 2:39:59 PM mhaimel Exp $
 */
package uk.ac.ebi.curtain.model.graph.io;

import uk.ac.ebi.curtain.model.graph.Graph;

/**
 * @author mhaimel
 *
 */
public class GraphUtil<N,A> {

	public static final char SEP_VALUE = '\t';
	public static final char HEADER_CHAR = '#';
	public static final char GRAPH_CHAR = 'G';
	public static final char NODE_CHAR = 'N';
	public static final char ARC_CHAR = 'A';
	public static final String HEADER_VALUE = HEADER_CHAR+"TYPE"+SEP_VALUE;
	public static final String GRAPH_START = GRAPH_CHAR+""+SEP_VALUE;
	public static final String NODE_START = NODE_CHAR+""+SEP_VALUE;
	public static final String ARC_START = ARC_CHAR+""+SEP_VALUE;
	
	private final Graph<N,A> graph;

	public GraphUtil(Graph<N,A> graph) {
		this.graph = graph;
	}	
	
	public GraphReader<N, A> getReader(){
		return new GraphReader<N, A>(this.graph);
	}
	
	public GraphWriter<N, A> getWriter(){
		return new GraphWriter<N, A>(this.graph);
	}
	
}
